﻿<%@ Page Language="C#" MasterPageFile="../Mother/MasterPageShow.master" AutoEventWireup="true" CodeFile="Files_new.aspx.cs" Inherits="Deparment_Files_new" Title="Untitled Page" validateRequest="false" %>
<%@ Register Assembly="FreeTextBox" Namespace="FreeTextBoxControls" TagPrefix="FTB" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Agency" Runat="Server">
<script language="javascript" type="text/javascript">
        function CheckValue(objTitleID,objContentID,send)
        {
            txttitle=document.getElementById(objTitleID).value;
            txtcontent=document.getElementById(objContentID).value;
            if(txttitle=="")
            {
                alert("标题不能为空!");
                return false;
            }
            if(txtcontent=="")
            {
                alert("信息内容不能为空!");
                return false;
            }
            if(send==2)
            {  
              if(document.getElementById("textsend").value=="")
              {
                alert("发送人不能为空!");
                return false;
              }
            }
        }
         function Sel()
        {
    
            window.open('SelectSend.aspx');
        }
        function confirmvalue(obj)
        { 
           //alert(obj.Accountid);
           //alert(obj.dwname);
           document.all('HiddenSend').value = obj.Accountid;
           document.all('textsend').value= obj.dwname;
               
        }
    </script>
    <div style="text-align:center;">
            <table id="tabData" width="98%" border="0" align="center" cellpadding="2" cellspacing="1"
                class="table_table2">
                <tr>
                    <td  class="table_td3" colspan="2" style="color:Blue; font-size:18px; font-weight:bold">新建文件
                    </td>
                </tr>
                <tr>
                    <td class="table_td3" style="width: 68px">
                        标题：</td>
                    <td class="table_td2" align="left">
                        <input type="text" name="txtName" id="txtName" size="40" value="<%=Request.Form["txtName"]==null?"":Request.Form["txtName"].Trim()%>"/>
                        <span style="color: #ff0000">(*)</span></td>
                </tr>
                <tr>
                    <td class="table_td3" style="height: 371px; width: 68px;" align="left">
                        内容：</td>
                    <td class="table_td2" style="height: 371px">
                        <div style="width: 100%; table-layout: fixed; text-align: left;">
                            <FTB:FreeTextBox ID="txtContent" runat="server">
                            </FTB:FreeTextBox>
                            <span style="color: #ff0000">(*)</span></div>
                    </td>
                </tr>
                <tr>
                    <td class="table_td3" style="height: 28px; width: 68px;">
                        上传附件：</td>
                    <td class="table_td2" style="height: 28px" align="left">
                        <asp:FileUpload ID="FileUpload1" unselectable="on"  runat="server" Width="604px" /></td>
                </tr>
                <tr>
                    <td class="table_td3" style="height: 28px; width: 68px;">
                        发送</td>
                    <td class="table_td2" style="height: 28px" align="left">
                       <input id="textsend" name="textsend" type="text" unselectable="on" />
                        <input type="button" name="btnSubmit" id="Submit1" value="选择发送人" class="button_bg6"
                          onclick='Sel()' style="width: 72px" />
                     
                        <input id="HiddenSend" type="hidden" name="HiddenSend" /></td>
                </tr>
                <tr>
                    <td class="table_td3" style="width: 68px">
                        &nbsp;</td>
                    <td class="table_td2">
                        &nbsp;<input type="submit" name="btnSubmit" id="btnSubmit" value="保  存" class="button_bg"
                            onclick="javascript:return CheckValue('txtName','<%=txtContent.ClientID %>',1)" />
                        &nbsp; &nbsp; &nbsp;
                        <input type="submit" name="btnSubmit2" id="Submit2" value="发 送" class="button_bg6"
                            onclick="javascript:return CheckValue('txtName','<%=txtContent.ClientID %>',2)" style="width: 70px" />
                        &nbsp; &nbsp; &nbsp;
                        <input id="Button2" class="button_bg" type="button" value="关  闭" onclick="window.close()" /></td>
                </tr>
            </table>
        </div>
</asp:Content>

